Additional Blakod Notes

By: Brian Green                Date: June 11, 2002

Purpose:

The purpose of this document is to record some of the little details of the Blakod language not captured in other documents.

Maximum integer size

Blakod has a maximum integer value that is considerably smaller than the value for most modern systems.  Blakod stores variables using 32 bit integers: 4 bits are for type, and the remaining 28 bits are for the value.  For integers, the value portion is the value of the integer.  Since all integers are signed, this leaves 27 bits for the maximum integer value.  This maximum value is:

2 27 - 1= 134,217,727  (minimum negative value is -134,217,728.  Blakod uses two's complement notation for negative numbers.)

If a Blakod integer variable exceeds this value, it will result in an overflow and the value will become a large negative number.

FindListElem

This is a standard Blakod call.

Form:
iIndex = FindListElem(lList, element);

Parameters:
lList = any list
element = any Blakod object

Return values:
Returns the index of the element if found in the list (1 for the first element, etc).
Returns 0 if element was not found.
Returns Nil ($) if the list is Nil.